/**
 * Moondance UML modeling tool
 * 
 * @author Dascalu Laurentiu (dascalu.laurentziu@gmail.com).
 * 
 * This program is free software; you can redistribute it and
 * modify it under the terms of the GNU General Public License
 * as published by the Free Software Foundation; either version 3
 * of the License, or (at your option) any later version.
 * 
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 * 
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
 */

package ro.pub.cs.se.moondance.xmi.converter;

import org.w3c.dom.Document;
import org.w3c.dom.Element;

public class UMLCompositeConnectionXMI extends UMLAggregationConnectionXMI {

	public UMLCompositeConnectionXMI(String name, String id, String source,
			String destination, String sourceLabel, String destinationLabel,
			String upperSourceType, String lowerSourceType, String upperSourceValue,
			String lowerSourceValue, String upperDestinationType, String lowerDestinationType,
			String upperDestinationValue, String lowerDestinationValue) {
		super(name, id, source, destination, sourceLabel, destinationLabel,
				upperSourceType, lowerSourceType, upperSourceValue, lowerSourceValue,
				upperDestinationType, lowerDestinationType, upperDestinationValue, lowerDestinationValue);
	}
	
	/**
	 * Example for COMPOSITE
	 * <packagedElement
	 * xmi:type="uml:Association"
	 * xmi:id="_BtgHYGcnEd6eLuBoYJyKmQ"
	 * name="CompositeDescription"
	 * composite = "true"
	 * memberEnd="_BtgHYWcnEd6eLuBoYJyKmQ _Btp4YGcnEd6eLuBoYJyKmQ">
	 *     <ownedEnd
	 *         xmi:id="_BtgHYWcnEd6eLuBoYJyKmQ"
	 *         name="src"
	 *         type="_HIolQGclEd6eLuBoYJyKmQ" // source
	 *         association="_BtgHYGcnEd6eLuBoYJyKmQ">
	 *             <upperValue
	 *                 xmi:type="uml:LiteralUnlimitedNatural"
	 *                 xmi:id="_BtgHY2cnEd6eLuBoYJyKmQ"
	 *                 value="1"/>
	 *             <lowerValue
	 *                 xmi:type="uml:LiteralInteger"
	 *                 xmi:id="_BtgHYmcnEd6eLuBoYJyKmQ"
	 *                 value="1"/>
	 *     </ownedEnd>
	 *     <ownedEnd
	 *          xmi:id="_Btp4YGcnEd6eLuBoYJyKmQ"
	 *          name="dst"
	 *          type="_G6e0gGclEd6eLuBoYJyKmQ" // target
	 *          aggregation="composite"
	 *          association="_BtgHYGcnEd6eLuBoYJyKmQ">
	 *              <upperValue
	 *                  xmi:type="uml:LiteralUnlimitedNatural"
	 *                  xmi:id="_Btp4YmcnEd6eLuBoYJyKmQ"
	 *                  value="1"/>
	 *              <lowerValue
	 *                  xmi:type="uml:LiteralInteger"
	 *                  xmi:id="_Btp4YWcnEd6eLuBoYJyKmQ"
	 *                  value="1"/>
	 *     </ownedEnd>
	 * </packagedElement>
	 */


	@Override
	public void serialize(Element root, Document document) {
		aggregationType = XMICommon.COMPOSITE;
		super.serialize(root, document);
	}
}
